package org.example.ch2;

import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observable;

public class Main5 {
    public static void main(String[] args) {
        Observable<Integer> integerObservable = Observable.fromArray(new Integer[]{1,2,3,4,5});

        integerObservable.subscribe(
                System.out::println,
                System.err::println,
                () -> System.out.println("流结束")
        );

    }
}
